<template>
    <!-- 核保平台 首页-->
    <div class="mianIndex">
        <!-- 右边栏目 -->
        <div class="mianIndex_right_box">
            <!-- <div class="close_btn" :style="{background: 'url('+close_btn+') center left no-repeat'}"></div> -->
            <div class="close_btn"></div>
            <div class="right_box_drawer">
                <div class="drawer_con">
                    <div class="con_module" @click="goPath('1')">
                        <i class="el-icon-search"></i>
                        <span class="policyEnquiry">保单查询</span>
                    </div>
                    <div class="con_module"  @click="goPath('2')">
                        <i class="el-icon-s-data"></i>
                        <span class="Statistical">统计报表</span>
                    </div>
                    
                    <!-- 接口测试(临时)2020-03-08 -->
                    <div class="con_module" style="border:1px solid #f76767;padding: 22px 10px; background: #fef0f0;" @click="goTestPage()">
                        <span class="Statistical" style="color:#f76767" >接口测试</span>
                    </div>

                </div>
                <div class="drawer_con">
                    <div class="drawer_con_title"  @click="goPath('3')">常用操作</div>
                    <span class="con-operate-btn"  @click="goPath('4')">核保处理</span>
                    <span class="con-operate-btn"  @click="goPath('5')">客户关系</span>
                    <span class="con-operate-btn"  @click="goPath('6')">综合查询</span>
                    <span class="con-operate-btn"  @click="goPath('7')">系统设置</span>
                </div>
                <!-- 排名榜    -->
                <div class="drawer_con">
                    <div class="drawer_con_title">排名榜</div>
                    <div class="con_ranking">
                        <p v-if="showRank">当前排名 <span class="red"> 第{{personRank}}名 </span>跑赢<span class="red"> {{personRankPr}}%</span> 核保员</p>
                        <el-table ref="multipleTable" v-loading="loading" :data="rankCurPage"  style="width: 100%" :show-header="false" class="mt10">
                            <el-table-column property="rank" align='center'>
                                <template slot-scope="scope">
                                   <span class="circle circle_red" v-if="scope.row.rank<=3">{{scope.row.rank}}</span>
                                   <span class="circle circle_gray" v-else-if="scope.row.rank>3">{{scope.row.rank}}</span>
                                </template>
                            </el-table-column>
                            <el-table-column property="userId" align='left' width="120" show-overflow-tooltip></el-table-column>
                            <el-table-column property="taskCount" align='center'></el-table-column>
                        </el-table>
                            <el-pagination background v-if='paginations.total > 0' :page-sizes="paginations.pageSizes" :page-size="paginations.pageSize"
                                :layout="paginations.layout" :total="paginations.total" :current-page='paginations.pageIndex'
                                @current-change='handleCurrentChange'>
                            </el-pagination>
                    </div>
                </div>
            </div>
        </div>
        <!-- 中间栏目 -->
        <div class="mianContent_box">
            <!-- 公告栏 -->
            <div class="con_notice">
                <el-row>
                    <el-col :span="2"><i class="el-icon-chat-line-round"></i><span>公告栏</span></el-col>
                    <el-col :span="10"><i class="el-icon-info"></i><span> {{bulletin.content}} {{bulletin.begTime}}</span></el-col>
                    <!-- <el-col :span="4"><span> {{bulletin.begTime}}</span></el-col> -->
                    <el-col :span="12" class="text_right"><span> 统计时间：{{statistics.date}}</span></el-col>
                </el-row>
            </div>
            <!-- 新单核保模块 -->
            <div class="con_column one">
                <div class="disabled_posion"></div>
                <div class="newUnderwrites " :class="{ 'disabled': !premissionMap['1'] }" @click="goToPath('1')">
                    <div class="column_title"><i class="el-icon-tickets"></i><span> 新单核保</span></div>
                    <div class="newUnderwrites_echarts" :style="{background: 'url('+echartsBg+') center no-repeat'}">
                        <el-progress v-if="nbWriterPercent>0" type="circle" :percentage='nbWriterPercent' :color="progressColors" :stroke-width="14"></el-progress>
                        <span v-if="nbWriterPercent==0" class="echarts_num">0%</span>
                    </div>
                    <div class="newUnderwrites_num">
                        <el-row>
                            <el-col :span="8">
                                <p class="text_name text_center"><i class="el-icon-date el_icon"></i></p>
                                <p class="text_name text_center"><span class="num">{{statistics.nbWriter.personUnProcess}}</span>个
                                </p>
                                <p class="text_name text_center"><span>未完成任务数</span></p>
                            </el-col>
                            <el-col :span="8" class="bor">
                                <p class="text_name text_center"><i class="el-icon-collection-tag el_icon"></i></p>
                                <p class="text_name text_center"><span
                                        class="num">{{statistics.nbWriter.warnCount}}</span>个</p>
                                <p class="text_name text_center"><span>预警任务数</span></p>
                            </el-col>
                            <el-col :span="8">
                                <p class="text_name text_center"><i class="el-icon-c-scale-to-original el_icon"></i></p>
                                <p class="text_name text_center"><span
                                        class="num">{{statistics.nbWriter.personTotal}}</span>个</p>
                                <p class="text_name text_center"><span>总任务数</span></p>
                            </el-col>
                        </el-row>
                    </div>
                </div>
                <!-- 保全核保/理赔二核 -->
                <div class="big_column_box">
                    <el-row>
                        <el-col :span="12" class="bor_right " :class="{ 'disabled': !premissionMap['2'] }" @click.native="goToPath('2')" >
                            <div class="column_title bor-left-radius"><i class="el-icon-tickets"></i><span> 保全核保</span></div>
                            <div class="big__column_num">
                                <p class="big_text_name text_center"><span class="big_num">{{statistics.posCount.unProcess}}</span>个</p>
                                <p class="text_name text_right">
                                    <el-col :span="11">预警任务数</el-col>
                                    <el-col :span="6"><span class="small_num">{{statistics.posCount.warnCount}}</span></el-col>
                                    <el-col :span="4">个</el-col>
                                </p>
                                <p class="text_name text_right"> 
                                    <el-col :span="11">总任务数</el-col>
                                    <el-col :span="6"><span class="small_num">{{statistics.posCount.total}}</span></el-col>
                                    <el-col :span="4">个</el-col>
                                </p>
                            </div>
                        </el-col>
                        <el-col :span="12" class="pb10 " :class="{ 'disabled': !premissionMap['3'] }" @click.native="goToPath('3')">
                            <div class="column_title"><i class="el-icon-tickets"></i><span> 理赔二核</span></div>
                            <div class="big__column_num">
                                <p class="big_text_name text_center"><span class="big_num">{{statistics.clmCount.unProcess}}</span>个</p>
                                <p class="text_name text_right">
                                    <el-col :span="11">预警任务数</el-col>
                                    <el-col :span="6"><span class="small_num">{{statistics.clmCount.warnCount}}</span></el-col>
                                    <el-col :span="4">个</el-col>
                                </p>
                                <p class="text_name text_right">
                                    <el-col :span="11">总任务数</el-col>
                                    <el-col :span="6"><span class="small_num">{{statistics.clmCount.total}}</span></el-col>
                                    <el-col :span="4">个</el-col>
                                </p>
                            </div>
                        </el-col>
                    </el-row>
                </div>
                <!-- 续期核保/承保后调查 -->
                <div class="big_column_box xuqi">
                    <el-row>
                        <el-col :span="12" class="bor_right " :class="{ 'disabled': !premissionMap['4'] }" @click.native="goToPath('4')">
                            <div class="column_title"><i class="el-icon-tickets"></i><span> 续期核保</span></div>
                            <div class="big__column_num">
                                <p class="big_text_name text_center"><span class="big_num">{{statistics.renewalCount.unProcess}}</span>个</p>
                                <p class="text_name text_right">
                                    <el-col :span="11">预警任务数</el-col>
                                    <el-col :span="6"><span class="small_num">{{statistics.renewalCount.warnCount}}</span></el-col>
                                    <el-col :span="4">个</el-col>
                                </p>
                                <p class="text_name text_right"> 
                                    <el-col :span="11">总任务数</el-col>
                                    <el-col :span="6"><span class="small_num">{{statistics.renewalCount.total}}</span></el-col>
                                    <el-col :span="4">个</el-col>
                                </p>
                            </div>
                        </el-col>
                        <el-col :span="12" class="pb10 " :class="{ 'disabled': !premissionMap['5'] }" @click.native="goToPath('5')">
                            <div class="column_title"><i class="el-icon-tickets"></i><span> 承保后调查</span></div>
                            <div class="big__column_num">
                                <p class="big_text_name text_center"><span class="big_num">{{statistics.inveCount.unProcess}}</span>个</p>
                                <p class="text_name text_right">
                                    <el-col :span="11">预警任务数</el-col>
                                    <el-col :span="6"><span class="small_num">{{statistics.inveCount.warnCount}}</span></el-col>
                                    <el-col :span="4">个</el-col>
                                </p>
                                <p class="text_name text_right">
                                    <el-col :span="11">总任务数</el-col>
                                    <el-col :span="6"><span class="small_num">{{statistics.inveCount.total}}</span></el-col>
                                    <el-col :span="4">个</el-col>
                                </p>
                            </div>
                        </el-col>
                    </el-row>
                </div>
            </div>

            <div class="con_column two">
                <el-row class="mt20">
                    <el-col :span="6" :class="{ 'disabled': !premissionMap['6'] }" @click.native="goToPath('6')">
                        <div class="small_column_box mr12 ">
                            <div class="small_column_title"><i class="el-icon-tickets"></i><span
                                    class="name"> 特别事项</span></div>
                            <div class="small_column_num">
                                <p class="big_text_name text_center"><span class="big_num">{{statistics.nbSpecCount.personUnProcess}}</span>个</p>
                                <p class="text_name text_right">
                                    <el-col :span="11">预警任务数</el-col>
                                    <el-col :span="6"><span class="small_num red">{{statistics.nbSpecCount.warnCount}}</span></el-col>
                                    <el-col :span="4">个</el-col>
                                </p>
                                <p class="text_name text_right">
                                    <el-col :span="11">总任务数</el-col>
                                    <el-col :span="6"><span class="small_num textColorGreen">{{statistics.nbSpecCount.personTotal}}</span></el-col>
                                    <el-col :span="4">个</el-col>
                                </p>
                            </div>
                        </div>
                    </el-col>
                    <el-col :span="6" :class="{ 'disabled': !premissionMap['7'] }" @click.native="goToPath('7')">
                        <div class="small_column_box mr12 ">
                            <div class="small_column_title"><i class="el-icon-tickets"></i><span
                                    class="name"> 资料修正</span></div>
                            <div class="small_column_num">
                                <p class="big_text_name text_center"><span class="big_num">{{statistics.nbDataCount.unProcess}}</span>个</p>
                                <p class="text_name text_right">
                                    <el-col :span="11">预警任务数</el-col>
                                    <el-col :span="6"><span class="small_num red">{{statistics.nbDataCount.warnCount}}</span></el-col>
                                    <el-col :span="4">个</el-col>
                                </p>
                                <p class="text_name text_right">
                                    <el-col :span="11">总任务数</el-col>
                                    <el-col :span="6"><span class="small_num textColorGreen">{{statistics.nbDataCount.total}}</span></el-col>
                                    <el-col :span="4">个</el-col>
                                </p>
                            </div>
                        </div>
                    </el-col>
                    <el-col :span="6" :class="{ 'disabled': !premissionMap['8'] }" @click.native="goToPath('8')">
                        <div class="small_column_box mr12 ">
                            <div class="small_column_title"><i class="el-icon-tickets"></i><span
                                    class="name"> 再保处理</span></div>
                            <div class="small_column_num">
                                <p class="big_text_name text_center"><span class="big_num">{{statistics.nbZbCount.unProcess}}</span>个</p>
                                <p class="text_name text_right">
                                    <el-col :span="11">预警任务数</el-col>
                                    <el-col :span="6"><span class="small_num red">{{statistics.nbZbCount.warnCount}}</span></el-col>
                                    <el-col :span="4">个</el-col>
                                </p>
                                <p class="text_name text_right">
                                    <el-col :span="11">总任务数</el-col>
                                    <el-col :span="6"><span class="small_num textColorGreen">{{statistics.nbZbCount.total}}</span></el-col>
                                    <el-col :span="4">个</el-col>
                                </p>
                            </div>
                        </div>
                    </el-col>
                    <el-col :span="6" :class="{ 'disabled': !premissionMap['9'] }" @click.native="goToPath('9')">
                        <div class="small_column_box ">
                            <div class="small_column_title"><i class="el-icon-tickets"></i><span
                                    class="name"> 预核保</span></div>
                            <div class="small_column_num">
                                <p class="big_text_name text_center"><span class="big_num">{{statistics.advanceCount.unProcess}}</span>个</p>
                                <p class="text_name text_right">
                                    <el-col :span="11">预警任务数</el-col>
                                    <el-col :span="6"><span class="small_num red">{{statistics.advanceCount.warnCount}}</span></el-col>
                                    <el-col :span="4">个</el-col>
                                </p>
                                <p class="text_name text_right">
                                    <el-col :span="11">总任务数</el-col>
                                    <el-col :span="6"><span class="small_num textColorGreen">{{statistics.advanceCount.total}}</span></el-col>
                                    <el-col :span="4">个</el-col>
                                </p>
                            </div>
                        </div>
                    </el-col>
                </el-row>
            </div>
            <!-- 实时作业监控 -->
            <div class="con_column tree">
                <div class="column_task_title"><i class="el-icon-odometer"></i><span> 实时作业监控</span></div>
                <div class="task_box">
                    <el-row>
                        <el-col :span="12">
                            <div class="col_task_title pl10 task_bor_right"><span class="name"> 个人作业</span></div>
                            <div class="col_task_con task_bor_right">
                                <el-row>
                                    <el-col :span="12"><i class="el-icon-time textColorbluce"></i><span> 未处理（<span
                                            class="textColorbluce">
                                        {{statistics.nbWriter.personUnProcess +
                                        statistics.nbDataCount.unProcess +
                                        statistics.nbZbCount.unProcess +
                                        statistics.advanceCount.unProcess +
                                        statistics.posCount.unProcess +
                                        statistics.clmCount.unProcess +
                                        statistics.renewalCount.unProcess +
                                        statistics.inveCount.unProcess }}
                                    </span>）</span></el-col>
                                    <el-col :span="12"><i class="el-icon-time textColorGreen"></i><span> 今日完成量（<span
                                            class="textColorGreen">
                                       {{statistics.nbWriter.personTotal - statistics.nbWriter.personUnProcess +
                                        statistics.nbDataCount.total - statistics.nbDataCount.unProcess+
                                        statistics.nbZbCount.total - statistics.nbZbCount.unProcess+
                                        statistics.advanceCount.total - statistics.advanceCount.unProcess+
                                        statistics.posCount.total - statistics.posCount.unProcess+
                                        statistics.clmCount.total - statistics.clmCount.unProcess+
                                        statistics.renewalCount.total - statistics.renewalCount.unProcess+
                                        statistics.inveCount.total - statistics.inveCount.unProcess}}
                                    </span>）</span></el-col>
                                </el-row>
                                <el-row>
                                    <el-col :span="12" class="task_con">
                                        <div class="task_con_list">
                                            <el-col :span="9" class="text_right pr10"><span>新单核保</span></el-col>
                                            <el-col :span="15" class="task_num">
                                                <!-- 1、未处理/全部为0:0 -->
                                                <el-progress v-if="statistics.nbWriter.personUnProcess==0 && statistics.nbWriter.personTotal==0" :stroke-width="16" :percentage="0" :format="format" class="Zero"></el-progress>
                                                <!-- 2、未处理/全部为0：100 -->
                                                <el-row v-if="statistics.nbWriter.personUnProcess==0 && statistics.nbWriter.personTotal!=0">
                                                    <el-col :span="14">
                                                        <p class="total">
                                                            <span class="" :style="'width:'+ 100 +'%;'">&nbsp;</span>
                                                        </p>
                                                    </el-col>
                                                    <el-col :span="10" class="pl10 fsize10">{{statistics.nbWriter.personUnProcess}}/{{statistics.nbWriter.personTotal}} </el-col>
                                                </el-row>
                                                <!-- 3、未处理/全部为60：100 -->
                                                 <el-row v-if="statistics.nbWriter.personUnProcess!=0 && statistics.nbWriter.personTotal!=0">
                                                    <el-col :span="14">
                                                        <p class="total">
                                                            <span class="unfinished" :style="'width:'+ (Math.abs(statistics.nbWriter.personUnProcess / statistics.nbWriter.personTotal))*100 +'%;'">&nbsp;</span>
                                                        </p>
                                                    </el-col>
                                                    <el-col :span="10" class="pl10 fsize10">{{statistics.nbWriter.personUnProcess}}/{{statistics.nbWriter.personTotal}} </el-col>
                                                </el-row>
                                            </el-col>
                                        </div>
                                        <div class="task_con_list">
                                            <el-col :span="9" class="text_right pr10"><span>资料修正</span></el-col>
                                            <el-col :span="15" class="task_num">
                                                 <!-- 1、未处理/全部为0:0 -->
                                               <el-progress v-if="statistics.nbDataCount.unProcess==0 && statistics.nbDataCount.total==0" :stroke-width="16" :percentage="0" :format="format" class="Zero"></el-progress>
                                                <!-- 2、未处理/全部为0：100 -->
                                                <el-row v-if="statistics.nbDataCount.unProcess==0 && statistics.nbDataCount.total!=0">
                                                    <el-col :span="14">
                                                        <p class="total">
                                                            <span class="" :style="'width:'+ 100 +'%;'">&nbsp;</span>
                                                        </p>
                                                    </el-col>
                                                    <el-col :span="10" class="pl10 fsize10">{{statistics.nbDataCount.unProcess}}/{{statistics.nbDataCount.total}} </el-col>
                                                </el-row>
                                                <!-- 3、未处理/全部为60：100 -->
                                                 <el-row v-if="statistics.nbDataCount.unProcess!=0 && statistics.nbDataCount.total!=0">
                                                    <el-col :span="14">
                                                        <p class="total">
                                                            <span class="unfinished" :style="'width:'+ (Math.abs(statistics.nbDataCount.unProcess / statistics.nbDataCount.total))*100 +'%;'">&nbsp;</span>
                                                        </p>
                                                    </el-col>
                                                    <el-col :span="10" class="pl10 fsize10">{{statistics.nbDataCount.unProcess}}/{{statistics.nbDataCount.total}} </el-col>
                                                </el-row>
                                            </el-col>
                                        </div>
                                        <div class="task_con_list">
                                            <el-col :span="9" class="text_right pr10"><span>再保处理</span></el-col>
                                            <el-col :span="15" class="task_num">
                                                <!-- 1、未处理/全部为0:0 -->
                                                <el-progress v-if="statistics.nbZbCount.unProcess==0 && statistics.nbZbCount.total==0" :stroke-width="16" :percentage="0" :format="format" class="Zero"></el-progress>
                                                <!-- 2、未处理/全部为0：100 -->
                                                <el-row v-if="statistics.nbZbCount.unProcess==0 && statistics.nbZbCount.total!=0">
                                                    <el-col :span="14">
                                                        <p class="total">
                                                            <span class="" :style="'width:'+ 100 +'%;'">&nbsp;</span>
                                                        </p>
                                                    </el-col>
                                                    <el-col :span="10" class="pl10 fsize10">{{statistics.nbZbCount.unProcess}}/{{statistics.nbZbCount.total}} </el-col>
                                                </el-row>
                                                <!-- 3、未处理/全部为60：100 -->
                                                 <el-row v-if="statistics.nbZbCount.unProcess!=0 && statistics.nbZbCount.total!=0">
                                                    <el-col :span="14">
                                                        <p class="total">
                                                            <span class="unfinished" :style="'width:'+ (Math.abs(statistics.nbZbCount.unProcess / statistics.nbZbCount.total))*100 +'%;'">&nbsp;</span>
                                                        </p>
                                                    </el-col>
                                                    <el-col :span="10" class="pl10 fsize10">{{statistics.nbZbCount.unProcess}}/{{statistics.nbZbCount.total}} </el-col>
                                                </el-row>
                                            </el-col>
                                        </div>
                                        <div class="task_con_list">
                                            <el-col :span="9" class="text_right pr10"><span>预核保</span></el-col>
                                            <el-col :span="15" class="task_num">
                                                 <!-- 1、未处理/全部为0:0 -->
                                                <el-progress v-if="statistics.advanceCount.unProcess==0 && statistics.advanceCount.total==0" :stroke-width="16" :percentage="0" :format="format" class="Zero"></el-progress>
                                                <!-- 2、未处理/全部为0：100 -->
                                                <el-row v-if="statistics.advanceCount.unProcess==0 && statistics.advanceCount.total!=0">
                                                    <el-col :span="14">
                                                        <p class="total">
                                                            <span class="" :style="'width:'+ 100 +'%;'">&nbsp;</span>
                                                        </p>
                                                    </el-col>
                                                    <el-col :span="10" class="pl10 fsize10">{{statistics.advanceCount.unProcess}}/{{statistics.advanceCount.total}} </el-col>
                                                </el-row>
                                                <!-- 3、未处理/全部为60：100 -->
                                                 <el-row v-if="statistics.advanceCount.unProcess!=0 && statistics.advanceCount.total!=0">
                                                    <el-col :span="14">
                                                        <p class="total">
                                                            <span class="unfinished" :style="'width:'+ (Math.abs(statistics.advanceCount.unProcess / statistics.advanceCount.total))*100 +'%;'">&nbsp;</span>
                                                        </p>
                                                    </el-col>
                                                    <el-col :span="10" class="pl10 fsize10">{{statistics.advanceCount.unProcess}}/{{statistics.advanceCount.total}} </el-col>
                                                </el-row>
                                            </el-col>
                                        </div>
                                    </el-col>
                                    <el-col :span="12" class="task_con">
                                        <div class="task_con_list">
                                            <el-col :span="9" class="text_right pr10"><span>保全核保</span></el-col>
                                            <el-col :span="15" class="task_num">
                                                <!-- 1、未处理/全部为0:0 -->
                                                <el-progress v-if="statistics.posCount.unProcess==0 && statistics.posCount.total==0" :stroke-width="16" :percentage="0" :format="format" class="Zero"></el-progress>
                                                <!-- 2、未处理/全部为0：100 -->
                                                <el-row v-if="statistics.posCount.unProcess==0 && statistics.posCount.total!=0">
                                                    <el-col :span="14">
                                                        <p class="total">
                                                            <span class="" :style="'width:'+ 100 +'%;'">&nbsp;</span>
                                                        </p>
                                                    </el-col>
                                                    <el-col :span="10" class="pl10 fsize10">{{statistics.posCount.unProcess}}/{{statistics.posCount.total}} </el-col>
                                                </el-row>
                                                <!-- 3、未处理/全部为60：100 -->
                                                 <el-row v-if="statistics.posCount.unProcess!=0 && statistics.posCount.total!=0">
                                                    <el-col :span="14">
                                                        <p class="total">
                                                            <span class="unfinished" :style="'width:'+ (Math.abs(statistics.posCount.unProcess / statistics.posCount.total))*100 +'%;'">&nbsp;</span>
                                                        </p>
                                                    </el-col>
                                                    <el-col :span="10" class="pl10 fsize10">{{statistics.posCount.unProcess}}/{{statistics.posCount.total}} </el-col>
                                                </el-row>
                                            </el-col>
                                        </div>
                                        <div class="task_con_list">
                                            <el-col :span="9" class="text_right pr10"><span>理赔二核</span></el-col>
                                            <el-col :span="15" class="task_num">
                                                 <!-- 1、未处理/全部为0:0 -->
                                                <el-progress v-if="statistics.clmCount.unProcess==0 && statistics.clmCount.total==0" :stroke-width="16" :percentage="0" :format="format" class="Zero"></el-progress>
                                                <!-- 2、未处理/全部为0：100 -->
                                                <el-row v-if="statistics.clmCount.unProcess==0 && statistics.clmCount.total!=0">
                                                    <el-col :span="14">
                                                        <p class="total">
                                                            <span class="" :style="'width:'+ 100 +'%;'">&nbsp;</span>
                                                        </p>
                                                    </el-col>
                                                    <el-col :span="10" class="pl10 fsize10">{{statistics.clmCount.unProcess}}/{{statistics.clmCount.total}} </el-col>
                                                </el-row>
                                                <!-- 3、未处理/全部为60：100 -->
                                                 <el-row v-if="statistics.clmCount.unProcess!=0 && statistics.clmCount.total!=0">
                                                    <el-col :span="14">
                                                        <p class="total">
                                                            <span class="unfinished" :style="'width:'+ (Math.abs(statistics.clmCount.unProcess / statistics.clmCount.total))*100 +'%;'">&nbsp;</span>
                                                        </p>
                                                    </el-col>
                                                    <el-col :span="10" class="pl10 fsize10">{{statistics.clmCount.unProcess}}/{{statistics.clmCount.total}} </el-col>
                                                </el-row>
                                            </el-col>
                                        </div>
                                        <div class="task_con_list">
                                            <el-col :span="9" class="text_right pr10"><span>续期核保</span></el-col>
                                            <el-col :span="15" class="task_num">
                                                <!-- 1、未处理/全部为0:0 -->
                                                <el-progress v-if="statistics.renewalCount.unProcess==0 && statistics.renewalCount.total==0" :stroke-width="16" :percentage="0" :format="format" class="Zero"></el-progress>
                                                <!-- 2、未处理/全部为0：100 -->
                                                <el-row v-if="statistics.renewalCount.unProcess==0 && statistics.renewalCount.total!=0">
                                                    <el-col :span="14">
                                                        <p class="total">
                                                            <span class="" :style="'width:'+ 100 +'%;'">&nbsp;</span>
                                                        </p>
                                                    </el-col>
                                                    <el-col :span="10" class="pl10 fsize10">{{statistics.renewalCount.unProcess}}/{{statistics.renewalCount.total}} </el-col>
                                                </el-row>
                                                <!-- 3、未处理/全部为60：100 -->
                                                 <el-row v-if="statistics.renewalCount.unProcess!=0 && statistics.renewalCount.total!=0">
                                                    <el-col :span="14">
                                                        <p class="total">
                                                            <span class="unfinished" :style="'width:'+ (Math.abs(statistics.renewalCount.unProcess / statistics.renewalCount.total))*100 +'%;'">&nbsp;</span>
                                                        </p>
                                                    </el-col>
                                                    <el-col :span="10" class="pl10 fsize10">{{statistics.renewalCount.unProcess}}/{{statistics.renewalCount.total}} </el-col>
                                                </el-row>
                                            </el-col>
                                        </div>
                                        <div class="task_con_list">
                                            <el-col :span="9" class="text_right pr10"><span>承保后调查</span></el-col>
                                            <el-col :span="15" class="task_num">
                                                <!-- 1、未处理/全部为0:0 -->
                                                <el-progress v-if="statistics.inveCount.unProcess==0 && statistics.inveCount.total==0" :stroke-width="16" :percentage="0" :format="format" class="Zero"></el-progress>
                                                <!-- 2、未处理/全部为0：100 -->
                                                <el-row v-if="statistics.inveCount.unProcess==0 && statistics.inveCount.total!=0">
                                                    <el-col :span="14">
                                                        <p class="total">
                                                            <span class="" :style="'width:'+ 100 +'%;'">&nbsp;</span>
                                                        </p>
                                                    </el-col>
                                                    <el-col :span="10" class="pl10 fsize10">{{statistics.inveCount.unProcess}}/{{statistics.inveCount.total}} </el-col>
                                                </el-row>
                                                <!-- 3、未处理/全部为60：100 -->
                                                 <el-row v-if="statistics.inveCount.unProcess!=0 && statistics.inveCount.total!=0">
                                                    <el-col :span="14">
                                                        <p class="total">
                                                            <span class="unfinished" :style="'width:'+ (Math.abs(statistics.inveCount.unProcess / statistics.inveCount.total))*100 +'%;'">&nbsp;</span>
                                                        </p>
                                                    </el-col>
                                                    <el-col :span="10" class="pl10 fsize10">{{statistics.inveCount.unProcess}}/{{statistics.inveCount.total}} </el-col>
                                                </el-row>
                                            </el-col>
                                        </div>
                                    </el-col>
                                </el-row>
                            </div>
                        </el-col>
                        <el-col :span="12">
                            <div class="col_task_title pl10"><span class="name"> 整体单量</span></div>
                            <div class="col_task_con">
                                <el-row>
                                    <el-col :span="12"><i class="el-icon-time textColorbluce"></i><span> 未处理（<span
                                            class="textColorbluce">
                                        {{statistics.nbWriter.unProcess +
                                        statistics.nbDataCount.unProcess +
                                        statistics.nbZbCount.unProcess +
                                        statistics.advanceCount.unProcess +
                                        statistics.posCount.unProcess +
                                        statistics.clmCount.unProcess +
                                        statistics.renewalCount.unProcess +
                                        statistics.inveCount.unProcess }}
                                    </span>）</span></el-col>
                                    <el-col :span="12"><i class="el-icon-time textColorGreen"></i><span> 总单量（<span
                                            class="textColorGreen">
                                         {{statistics.nbWriter.total +
                                        statistics.nbDataCount.total +
                                        statistics.nbZbCount.total +
                                        statistics.advanceCount.total +
                                        statistics.posCount.total +
                                        statistics.clmCount.total +
                                        statistics.renewalCount.total +
                                        statistics.inveCount.total }}
                                    </span>）</span></el-col>
                                </el-row>
                                <el-row>
                                    <el-col :span="12" class="task_con">
                                        <div class="task_con_list">
                                            <el-col :span="9" class="text_right pr10"><span>新单核保</span></el-col>
                                            <el-col :span="15" class="task_num">
                                                <!-- 1、未处理/全部为0:0 -->
                                                <el-progress v-if="statistics.nbHebao.unProcess==0 && statistics.nbHebao.total==0" :stroke-width="16" :percentage="0" :format="format" class="Zero"></el-progress>
                                                <!-- 2、未处理/全部为0：100 -->
                                                <el-row v-if="statistics.nbHebao.unProcess==0 && statistics.nbHebao.total!=0">
                                                    <el-col :span="14">
                                                        <p class="total">
                                                            <span class="" :style="'width:'+ 100 +'%;'">&nbsp;</span>
                                                        </p>
                                                    </el-col>
                                                    <el-col :span="10" class="pl10 fsize10">{{statistics.nbHebao.unProcess}}/{{statistics.nbHebao.total}} </el-col>
                                                </el-row>
                                                <!-- 3、未处理/全部为60：100 -->
                                                 <el-row v-if="statistics.nbHebao.unProcess!=0 && statistics.nbHebao.total!=0">
                                                    <el-col :span="14">
                                                        <p class="total">
                                                            <span class="unfinished" :style="'width:'+ (Math.abs(statistics.nbHebao.unProcess / statistics.nbHebao.total))*100 +'%;'">&nbsp;</span>
                                                        </p>
                                                    </el-col>
                                                    <el-col :span="10" class="pl10 fsize10">{{statistics.nbHebao.unProcess}}/{{statistics.nbHebao.total}} </el-col>
                                                </el-row>
                                            </el-col>
                                        </div>
                                        <div class="task_con_list">
                                            <el-col :span="9" class="text_right pr10"><span>照会回复</span></el-col>
                                            <el-col :span="15" class="task_num">
                                                <!-- 1、未处理/全部为0:0 -->
                                                <el-progress v-if="statistics.nbHF.unProcess==0 && statistics.nbHF.total==0" :stroke-width="16" :percentage="0" :format="format" class="Zero"></el-progress>
                                                <!-- 2、未处理/全部为0：100 -->
                                                <el-row v-if="statistics.nbHF.unProcess==0 && statistics.nbHF.total!=0">
                                                    <el-col :span="14">
                                                        <p class="total">
                                                            <span class="" :style="'width:'+ 100 +'%;'">&nbsp;</span>
                                                        </p>
                                                    </el-col>
                                                    <el-col :span="10" class="pl10 fsize10">{{statistics.nbHF.unProcess}}/{{statistics.nbHF.total}} </el-col>
                                                </el-row>
                                                <!-- 3、未处理/全部为60：100 -->
                                                <el-row v-if="statistics.nbHF.unProcess!=0 && statistics.nbHF.total!=0">
                                                    <el-col :span="14">
                                                        <p class="total">
                                                            <span class="unfinished" :style="'width:'+ (Math.abs(statistics.nbHF.unProcess / statistics.nbHF.total))*100 +'%;'">&nbsp;</span>
                                                        </p>
                                                    </el-col>
                                                    <el-col :span="10" class="pl10 fsize10">{{statistics.nbHF.unProcess}}/{{statistics.nbHF.total}} </el-col>
                                                </el-row>
                                            </el-col>
                                        </div>
                                        <div class="task_con_list">
                                            <el-col :span="9" class="text_right pr10"><span>新单合计</span></el-col>
                                            <el-col :span="15" class="task_num">
                                                <!-- 1、未处理/全部为0:0 -->
                                                <el-progress v-if="statistics.nbWriter.unProcess==0 && statistics.nbWriter.total==0" :stroke-width="16" :percentage="0" :format="format" class="Zero"></el-progress>
                                                <!-- 2、未处理/全部为0：100 -->
                                                <el-row v-if="statistics.nbWriter.unProcess==0 && statistics.nbWriter.total!=0">
                                                    <el-col :span="14">
                                                        <p class="total">
                                                            <span class="" :style="'width:'+ 100 +'%;'">&nbsp;</span>
                                                        </p>
                                                    </el-col>
                                                    <el-col :span="10" class="pl10 fsize10">{{statistics.nbWriter.unProcess}}/{{statistics.nbWriter.total}} </el-col>
                                                </el-row>
                                                <!-- 3、未处理/全部为60：100 -->
                                                <el-row v-if="statistics.nbWriter.unProcess!=0 && statistics.nbWriter.total!=0">
                                                    <el-col :span="14">
                                                        <p class="total">
                                                            <span class="unfinished" :style="'width:'+ (Math.abs(statistics.nbWriter.unProcess / statistics.nbWriter.total))*100 +'%;'">&nbsp;</span>
                                                        </p>
                                                    </el-col>
                                                    <el-col :span="10" class="pl10 fsize10">{{statistics.nbWriter.unProcess}}/{{statistics.nbWriter.total}} </el-col>
                                                </el-row>
                                            </el-col>
                                        </div>
                                        <div class="task_con_list">
                                            <el-col :span="9" class="text_right pr10"><span>资料修正</span></el-col>
                                            <el-col :span="15" class="task_num">
                                                <!-- 1、未处理/全部为0:0 -->     
                                               <el-progress v-if="statistics.nbDataCount.unProcess==0 && statistics.nbDataCount.total==0" :stroke-width="16" :percentage="0" :format="format" class="Zero"></el-progress>
                                                <!-- 2、未处理/全部为0：100 -->
                                                <el-row v-if="statistics.nbDataCount.unProcess==0 && statistics.nbDataCount.total!=0">
                                                    <el-col :span="14">
                                                        <p class="total">
                                                            <span class="" :style="'width:'+ 100 +'%;'">&nbsp;</span>
                                                        </p>
                                                    </el-col>
                                                    <el-col :span="10" class="pl10 fsize10">{{statistics.nbDataCount.unProcess}}/{{statistics.nbDataCount.total}} </el-col>
                                                </el-row>
                                                <!-- 3、未处理/全部为60：100 -->
                                                 <el-row v-if="statistics.nbDataCount.unProcess!=0 && statistics.nbDataCount.total!=0">
                                                    <el-col :span="14">
                                                        <p class="total">
                                                            <span class="unfinished" :style="'width:'+ (Math.abs(statistics.nbDataCount.unProcess / statistics.nbDataCount.total))*100 +'%;'">&nbsp;</span>
                                                        </p>
                                                    </el-col>
                                                    <el-col :span="10" class="pl10 fsize10">{{statistics.nbDataCount.unProcess}}/{{statistics.nbDataCount.total}} </el-col>
                                                </el-row>
                                            </el-col>
                                        </div>
                                        <div class="task_con_list">
                                            <el-col :span="9" class="text_right pr10"><span>再保处理</span></el-col>
                                            <el-col :span="15" class="task_num">
                                                <!-- 1、未处理/全部为0:0 -->
                                                <el-progress v-if="statistics.nbZbCount.unProcess==0 && statistics.nbZbCount.total==0" :stroke-width="16" :percentage="0" :format="format" class="Zero"></el-progress>
                                                <!-- 2、未处理/全部为0：100 -->
                                                <el-row v-if="statistics.nbZbCount.unProcess==0 && statistics.nbZbCount.total!=0">
                                                    <el-col :span="14">
                                                        <p class="total">
                                                            <span class="" :style="'width:'+ 100 +'%;'">&nbsp;</span>
                                                        </p>
                                                    </el-col>
                                                    <el-col :span="10" class="pl10 fsize10">{{statistics.nbZbCount.unProcess}}/{{statistics.nbZbCount.total}} </el-col>
                                                </el-row>
                                                <!-- 3、未处理/全部为60：100 -->
                                                 <el-row v-if="statistics.nbZbCount.unProcess!=0 && statistics.nbZbCount.total!=0">
                                                    <el-col :span="14">
                                                        <p class="total">
                                                            <span class="unfinished" :style="'width:'+ (Math.abs(statistics.nbZbCount.unProcess / statistics.nbZbCount.total))*100 +'%;'">&nbsp;</span>
                                                        </p>
                                                    </el-col>
                                                    <el-col :span="10" class="pl10 fsize10">{{statistics.nbZbCount.unProcess}}/{{statistics.nbZbCount.total}} </el-col>
                                                </el-row>
                                            </el-col>
                                        </div>
                                    </el-col>

                                    <el-col :span="12" class="task_con">
                                        <div class="task_con_list">
                                            <el-col :span="9" class="text_right pr10"><span>预核保</span></el-col>
                                            <el-col :span="15" class="task_num">
                                                <!-- 1、未处理/全部为0:0 -->
                                                <el-progress v-if="statistics.advanceCount.unProcess==0 && statistics.advanceCount.total==0" :stroke-width="16" :percentage="0" :format="format" class="Zero"></el-progress>
                                                <!-- 2、未处理/全部为0：100 -->
                                                <el-row v-if="statistics.advanceCount.unProcess==0 && statistics.advanceCount.total!=0">
                                                    <el-col :span="14">
                                                        <p class="total">
                                                            <span class="" :style="'width:'+ 100 +'%;'">&nbsp;</span>
                                                        </p>
                                                    </el-col>
                                                    <el-col :span="10" class="pl10 fsize10">{{statistics.advanceCount.unProcess}}/{{statistics.advanceCount.total}} </el-col>
                                                </el-row>
                                                <!-- 3、未处理/全部为60：100 -->
                                                <el-row v-if="statistics.advanceCount.unProcess!=0 && statistics.advanceCount.total!=0">
                                                    <el-col :span="14">
                                                        <p class="total">
                                                            <span class="unfinished" :style="'width:'+ (Math.abs(statistics.advanceCount.unProcess / statistics.advanceCount.total))*100 +'%;'">&nbsp;</span>
                                                        </p>
                                                    </el-col>
                                                    <el-col :span="10" class="pl10 fsize10">{{statistics.advanceCount.unProcess}}/{{statistics.advanceCount.total}} </el-col>
                                                </el-row>
                                            </el-col>
                                        </div>
                                        <div class="task_con_list">
                                            <el-col :span="9" class="text_right pr10"><span>保全核保</span></el-col>
                                            <el-col :span="15" class="task_num">
                                                <!-- 1、未处理/全部为0:0 -->
                                                <el-progress v-if="statistics.posCount.unProcess==0 && statistics.posCount.total==0" :stroke-width="16" :percentage="0" :format="format" class="Zero"></el-progress>
                                                <!-- 2、未处理/全部为0：100 -->
                                                <el-row v-if="statistics.posCount.unProcess==0 && statistics.posCount.total!=0">
                                                    <el-col :span="14">
                                                        <p class="total">
                                                            <span class="" :style="'width:'+ 100 +'%;'">&nbsp;</span>
                                                        </p>
                                                    </el-col>
                                                    <el-col :span="10" class="pl10 fsize10">{{statistics.posCount.unProcess}}/{{statistics.posCount.total}} </el-col>
                                                </el-row>
                                                <!-- 3、未处理/全部为60：100 -->
                                                 <el-row v-if="statistics.posCount.unProcess!=0 && statistics.posCount.total!=0">
                                                    <el-col :span="14">
                                                        <p class="total">
                                                            <span class="unfinished" :style="'width:'+ (Math.abs(statistics.posCount.unProcess / statistics.posCount.total))*100 +'%;'">&nbsp;</span>
                                                        </p>
                                                    </el-col>
                                                    <el-col :span="10" class="pl10 fsize10">{{statistics.posCount.unProcess}}/{{statistics.posCount.total}} </el-col>
                                                </el-row>
                                            </el-col>
                                        </div>
                                        <div class="task_con_list">
                                            <el-col :span="9" class="text_right pr10"><span>理赔二核</span></el-col>
                                            <el-col :span="15" class="task_num">
                                                <!-- 1、未处理/全部为0:0 -->
                                                <el-progress v-if="statistics.clmCount.unProcess==0 && statistics.clmCount.total==0" :stroke-width="16" :percentage="0" :format="format" class="Zero"></el-progress>
                                                <!-- 2、未处理/全部为0：100 -->
                                                <el-row v-if="statistics.clmCount.unProcess==0 && statistics.clmCount.total!=0">
                                                    <el-col :span="14">
                                                        <p class="total">
                                                            <span class="" :style="'width:'+ 100 +'%;'">&nbsp;</span>
                                                        </p>
                                                    </el-col>
                                                    <el-col :span="10" class="pl10 fsize10">{{statistics.clmCount.unProcess}}/{{statistics.clmCount.total}} </el-col>
                                                </el-row>
                                                <!-- 3、未处理/全部为60：100 -->
                                                 <el-row v-if="statistics.clmCount.unProcess!=0 && statistics.clmCount.total!=0">
                                                    <el-col :span="14">
                                                        <p class="total">
                                                            <span class="unfinished" :style="'width:'+ (Math.abs(statistics.clmCount.unProcess / statistics.clmCount.total))*100 +'%;'">&nbsp;</span>
                                                        </p>
                                                    </el-col>
                                                    <el-col :span="10" class="pl10 fsize10">{{statistics.clmCount.unProcess}}/{{statistics.clmCount.total}} </el-col>
                                                </el-row>
                                            </el-col>
                                        </div>
                                        <div class="task_con_list">
                                            <el-col :span="9"  class="text_right pr10"><span>续期核保</span></el-col>
                                            <el-col :span="15" class="task_num">
                                                <!-- 1、未处理/全部为0:0 -->
                                                <el-progress v-if="statistics.renewalCount.unProcess==0 && statistics.renewalCount.total==0" :stroke-width="16" :percentage="0" :format="format" class="Zero"></el-progress>
                                                <!-- 2、未处理/全部为0：100 -->
                                                <el-row v-if="statistics.renewalCount.unProcess==0 && statistics.renewalCount.total!=0">
                                                    <el-col :span="14">
                                                        <p class="total">
                                                            <span class="" :style="'width:'+ 100 +'%;'">&nbsp;</span>
                                                        </p>
                                                    </el-col>
                                                    <el-col :span="10" class="pl10 fsize10">{{statistics.renewalCount.unProcess}}/{{statistics.renewalCount.total}} </el-col>
                                                </el-row>
                                                <!-- 3、未处理/全部为60：100 -->
                                                 <el-row v-if="statistics.renewalCount.unProcess!=0 && statistics.renewalCount.total!=0">
                                                    <el-col :span="14">
                                                        <p class="total">
                                                            <span class="unfinished" :style="'width:'+ (Math.abs(statistics.renewalCount.unProcess / statistics.renewalCount.total))*100 +'%;'">&nbsp;</span>
                                                        </p>
                                                    </el-col>
                                                    <el-col :span="10" class="pl10 fsize10">{{statistics.renewalCount.unProcess}}/{{statistics.renewalCount.total}} </el-col>
                                                </el-row>
                                            </el-col>
                                        </div>
                                        <div class="task_con_list">
                                            <el-col :span="9"  class="text_right pr10"><span>承保后调查</span></el-col>
                                            <el-col :span="15" class="task_num">
                                                <!-- 1、未处理/全部为0:0 -->
                                                <el-progress v-if="statistics.inveCount.unProcess==0 && statistics.inveCount.total==0" :stroke-width="16" :percentage="0" :format="format" class="Zero"></el-progress>
                                                <!-- 2、未处理/全部为0：100 -->
                                                <el-row v-if="statistics.inveCount.unProcess==0 && statistics.inveCount.total!=0">
                                                    <el-col :span="14">
                                                        <p class="total">
                                                            <span class="" :style="'width:'+ 100 +'%;'">&nbsp;</span>
                                                        </p>
                                                    </el-col>
                                                    <el-col :span="10" class="pl10 fsize10">{{statistics.inveCount.unProcess}}/{{statistics.inveCount.total}} </el-col>
                                                </el-row>
                                                <!-- 3、未处理/全部为60：100 -->
                                                 <el-row v-if="statistics.inveCount.unProcess!=0 && statistics.inveCount.total!=0">
                                                    <el-col :span="14">
                                                        <p class="total">
                                                            <span class="unfinished" :style="'width:'+ (Math.abs(statistics.inveCount.unProcess / statistics.inveCount.total))*100 +'%;'">&nbsp;</span>
                                                        </p>
                                                    </el-col>
                                                    <el-col :span="10" class="pl10 fsize10">{{statistics.inveCount.unProcess}}/{{statistics.inveCount.total}} </el-col>
                                                </el-row>
                                            </el-col>
                                        </div>
                                    </el-col>
                                </el-row>
                            </div>
                        </el-col>
                    </el-row>
                </div>
            </div>

        </div>
    </div>
</template>

<script>
    import constant from '@/utils/constant';
    import close_btn from '@/assets/img/close_btn.png';
    import echartsBg from '@/assets/img/echartsBg.png';
    import {homeStatistics, lastBulletin, rankList} from "@/api/home/home";
   import { getToken } from '@/utils/auth' // 验权(从cookie中获取)

    export default {
        data() {
            return {
                loading:false,
                close_btn: close_btn,
                echartsBg: echartsBg,
                progressColors: [{color: '#f76767'}],
                bulletin: {
                    content: "",
                    begTime: ""
                },
                statistics: {
                    "date": "",
                    "nbWriter": {
                        "total":0,
                        "unProcess": 0,
                        "personTotal": 0,
                        "personUnProcess": 0,
                        "warnCount": 0
                    },
                    "nbHebao": {
                        "total":0,
                        "unProcess": 0,
                        "personTotal": 0,
                        "personUnProcess": 0,
                        "warnCount": 0
                    },
                    "nbHF": {
                        "total":0,
                        "unProcess": 0,
                        "personTotal": 0,
                        "personUnProcess": 0,
                        "warnCount": 0
                    },
                    "posCount": {
                        "total": 0,
                        "unProcess": 0,
                        "warnCount": 0
                    },
                    "clmCount": {
                        "total": 0,
                        "unProcess": 0,
                        "warnCount": 0
                    },
                    "renewalCount": {
                        "total": 0,
                        "unProcess": 0,
                        "warnCount": 0
                    },
                    "inveCount": {
                        "total": 0,
                        "unProcess": 0,
                        "warnCount": 0
                    },
                    "nbSpecCount": {
                        "total": 0,
                        "unProcess": 0,
                        "personTotal": 0,
                        "personUnProcess": 0,
                        "warnCount": 0
                    },
                    "nbDataCount": {
                        "total": 0,
                        "unProcess": 0,
                        "warnCount": 0
                    },
                    "nbZbCount": {
                        "total": 0,
                        "unProcess": 0,
                        "warnCount": 0
                    },
                    "advanceCount": {
                        "total": 0,
                        "unProcess": 0,
                        "warnCount": 0
                    }
                },
                nbWriterPercent: "0",
                showRank:false,
                personRank:"0",
                personRankPr:"0%",
                rank: [],
                premissionMap:{},
                paginations: {
                    total: 0,        // 总数
                    pageIndex: 1,  // 当前位于哪页
                    pageSize: 15,   // 1页显示多少条
                    pageSizes: [5, 10, 15, 20],  //每页显示多少条
                    layout: "prev, pager, next"   // 翻页属性
                },
                rankCurPage:[]
            }
        },
        activated() {
            this.$destroyCacheKey()
        },
        created() {
            //公告查询
            this.lastBulletin();
            this.rankList();
            this.homeStatistics();
            let token = getToken("token");
            let menus = localStorage.getItem(token);
            //跳转权限
            this.checkPremission(menus)
        },
        mounted() {
            // this.getList();
        },
        methods: {
            // 上下分页
            handleCurrentChange(page) {
                this.paginations.pageIndex = page;
                this.rankList();
            },
            // 接口测试(临时)
            goTestPage(){
                this.$router.push({path: "/home/test/testInterface"})
            },

            // 实时作业监控 任务为0的效果
            format(percentage) {
                return percentage === 0 ? '0' : `${percentage}%`;
            },

            lastBulletin() {
                this.$store.dispatch('loading/CHANGE_LOADING', true);
                lastBulletin().then(res => {
                    this.$store.dispatch('loading/CHANGE_LOADING', false);
                    if (res.resultCode == constant.SUCCESS && res,data) {
                        this.bulletin = res.data;
                    } else {
                        this.$message.error(res.resultMsg);
                    }
                }).catch(err => {
                    this.$store.dispatch('loading/CHANGE_LOADING', false);
                })
            },
            rankList() {
                let userKeyInfo = JSON.parse(sessionStorage.getItem("userInfo"));
                this.$store.dispatch('loading/CHANGE_LOADING', true);
                rankList().then(res => {
                    this.$store.dispatch('loading/CHANGE_LOADING', false);
                    if (res.resultCode == constant.SUCCESS) {
                        this.rank = res.data;
                        this.rankCurPage=this.rank.slice((this.paginations.pageIndex-1)*this.paginations.pageSize,this.paginations.pageIndex*this.paginations.pageSize)
                        this.paginations.total = res.data.length;
                        for (let i = 0; i < this.rank.length; i++) {
                            if (userKeyInfo && userKeyInfo.id && this.rank[i].userId == userKeyInfo.id){
                                this.showRank = true;
                                this.personRank = this.rank[i].rank;
                                this.personRankPr = this.GetPercent(this.rank.length - this.rank[i].rank,this.rank.length-1);
                                break;
                            }
                        }
                        console.log(this.rank);
                    } else {
                        this.$message.error(res.resultMsg);
                    }
                }).catch(err => {
                    this.$store.dispatch('loading/CHANGE_LOADING', false);
                })
            },
            homeStatistics() {
                this.$store.dispatch('loading/CHANGE_LOADING', true);
                homeStatistics().then(res => {
                    this.$store.dispatch('loading/CHANGE_LOADING', false);
                    if (res.resultCode == constant.SUCCESS) {
                        this.statistics = res.data;
                        this.nbWriterPercent = this.GetPercent(res.data.nbWriter.personTotal - res.data.nbWriter.personUnProcess, res.data.nbWriter.personTotal);
                        console.log(this.statistics);
                    } else {
                        this.$message.error(res.resultMsg);
                    }
                }).catch(err => {
                    this.$store.dispatch('loading/CHANGE_LOADING', false);
                })
            },
            goToPath(type){
                if (this.premissionMap[type] == undefined || this.premissionMap[type] == null || !this.premissionMap[type]){
                    console.log("无权限访问");
                    return;
                }
                if (type == "1"){
                    this.$router.push({path:"/home/taskCenter/newCovenantWordlist/newUnderwritList"})
                }else if (type == "2"){
                    this.$router.push({path:"/home/taskCenter/pos/posUnderwriteList"})
                }else if (type == "3"){
                    this.$router.push({path:"/home/taskCenter/clm/clmUnderwriteList"})
                }else if (type == "4"){
                    this.$router.push({path:"/home/taskCenter/renewal/renewalUnderwriteList"})
                }else if (type == "5"){
                   this.$router.push({path:"/home/taskCenter/newCovenantWordlist/investigationList"})
                }else if (type == "6"){
                    this.$router.push({path:"/home/taskCenter/newCovenantWordlist/specialList"})
                }else if (type == "7"){
                    this.$router.push({path:"/home/taskCenter/newCovenantWordlist/dataModifyList"})
                }else if (type == "8"){
                    this.$router.push({path:"/home/taskCenter/newCovenantWordlist/zbclList"})
                }else if (type == "9"){
                    this.$router.push({path:"/home/taskCenter/pre/insuranceList"})
                } 
            },
            checkPremission(menus){
               if (menus.indexOf("/home/taskCenter/newCovenantWordlist/newUnderwritList") != -1){
                   this.premissionMap["1"] = true;
               }else {
                   this.premissionMap["1"] = false;
               }
                if (menus.indexOf("/home/taskCenter/pos/posUnderwriteList")  != -1){
                    this.premissionMap["2"] = true;
                }else {
                    this.premissionMap["2"] = false;
                }
                if (menus.indexOf("/home/taskCenter/clm/clmUnderwriteList")  != -1){
                    this.premissionMap["3"] = true;
                }else {
                    this.premissionMap["3"] = false;
                }
                if (menus.indexOf("/home/taskCenter/renewal/renewalUnderwriteList")  != -1){
                    this.premissionMap["4"] = true;
                }else {
                    this.premissionMap["4"] = false;
                }
                if (menus.indexOf("/home/taskCenter/newCovenantWordlist/investigationList")  != -1){
                    this.premissionMap["5"] = true;
                }else {
                    this.premissionMap["5"] = false;
                }
                if (menus.indexOf("/home/taskCenter/newCovenantWordlist/specialList")  != -1){
                    this.premissionMap["6"] = true;
                }else {
                    this.premissionMap["6"] = false;
                }
                if (menus.indexOf("/home/taskCenter/newCovenantWordlist/dataModifyList")  != -1){
                    this.premissionMap["7"] = true;
                }else {
                    this.premissionMap["7"] = false;
                }
                if (menus.indexOf("/home/taskCenter/newCovenantWordlist/zbclList")  != -1){
                    this.premissionMap["8"] = true;
                }else {
                    this.premissionMap["8"] = false;
                }
                if (menus.indexOf("/home/taskCenter/pre/insuranceList")  != -1){
                    this.premissionMap["9"] = true;
                }else {
                    this.premissionMap["9"] = false;
                }

                if (menus.indexOf("/statis/summaryWork")  != -1){
                    this.premissionMap["10"] = true;
                }else {
                    this.premissionMap["10"] = false;
                }
                if (menus.indexOf("/home/setting/setLevel")  != -1){
                    this.premissionMap["11"] = true;
                }else {
                    this.premissionMap["11"] = false;
                }
            },
            goPath(type){
                if (type == "1"){
                    // window.open("http://128.232.11.204:30024/IPAS/query/qry/compQuery")
                    let queryUrl = constant.queryUrl;
                    window.open(queryUrl,"query");
                }else if (type == "2" && this.premissionMap["10"]){
                    this.$router.push({path:"/statis/summaryWork"})
                }else if (type == "4" && this.premissionMap["1"]){
                    this.$router.push({path:"/home/taskCenter/newCovenantWordlist/newUnderwritList"})
                }else if (type == "5"){
                    // window.open("http://128.232.11.204:30024/IPAS/query/qry/compQuery")
                    let queryUrl = constant.queryUrl;
                    window.open(queryUrl,"query");
                }else if (type == "6"){
                    // window.open("http://128.232.11.204:30024/IPAS/query/qry/compQuery")
                    let queryUrl = constant.queryUrl;
                    window.open(queryUrl,"query");
                }else if (type == "7" && this.premissionMap["11"]){
                    this.$router.push({path:"/home/setting/setLevel"})
                }
            },
            GetPercent(num, total) {
                /// <summary>
                /// 求百分比
                /// </summary>
                /// <param name="num">当前数</param>
                /// <param name="total">总数</param>
                num = parseFloat(num);
                total = parseFloat(total);
                if (isNaN(num) || isNaN(total)) {
                    return "-";
                }
                return total <= 0 ? "0" : (Math.round(num / total * 10000) / 100.00);
            }
        },
        computed: {}
        ,
    }
</script>

<style lang="less" scoped>
    .mianIndex {
        width: 100%;
        overflow: hidden;
        background-color: #f9f9f9;

        // 设置不同用户访问权限效果 2020-04-17
        
        .disabled{
            background: #c0c4cc!important;
            cursor: no-drop!important;
            .small_column_title{
               background: #c0c4cc!important;
               .el-icon-tickets,span.name{
                   color: #fff!important;
               }
            }
            .small_column_num{
                background: #c0c4cc!important;
                p.big_text_name,span.big_num,span.small_num,.el-col{
                   color: #fff!important;
               }
            }
        }

        .big_column_box .disabled:first-child{
            border-top-left-radius:5px!important;
            border-bottom-left-radius: 5px!important;
        }
        .big_column_box .disabled:nth-child(2){
            border-top-right-radius:5px;
            border-bottom-right-radius:5px;
        }

        .two .disabled{
            background: none!important;
        }
        // end 2020-04-17



        // 右侧收缩模块
        .mianIndex_right_box {
            // position: fixed;
            // top: 80px;
            // right: 0;
            // z-index: 1000;
            float: right;
            background-color: #f9f9f9;
            margin-bottom: 20px;
            width: 320px;

            // 右边_收起展开按钮
            .close_btn {
                float: left;
                width: 19px;
                border-left: 1px solid #e1e1e1;
                cursor: pointer;
                min-height: 880px;
                height: 100% !important;
            }

            // 右边_侧边栏内容
            .right_box_drawer {
                width: 300px;
                float: right;

                .drawer_con {
                    overflow: hidden;

                    .drawer_con_title {
                        color: #333;
                        padding: 10px 0 20px 0;
                    }

                    // 保单查询/统计监控按钮
                    .con_module {
                        background-color: #fff;
                        color: #333;
                        cursor: pointer;
                        float: left;
                        margin: 20px 10px 20px 0;
                        border: 1px solid #e1e1e1;
                        width: 80px;
                        padding: 10px 0;

                        .el-icon-s-data, .el-icon-search {
                            font-size: 24px;
                            width: 100%;
                            color: #69a3fc;
                            text-align: center;
                        }

                        .policyEnquiry, .Statistical {
                            width: 100%;
                            text-align: center;
                            display: block;
                            padding-top: 5px;
                        }
                    }

                    // 常用操作栏目
                    .con-operate-btn {
                        display: inline-block;
                        margin: 0 10px 10px 0px;
                        width: 136px;
                        border: 1px solid #e1e1e1;
                        background-color: #fff;
                        padding: 10px 0;
                        text-align: center;
                        cursor: pointer;
                    }


                    //排名榜栏目
                    .con_ranking {
                        border: 1px solid #e1e1e1;
                        background-color: #fff;
                        padding: 20px;
                        margin-right: 20px;
                        .circle{
                                width: 20px;
                                height: 20px;
                                line-height: 20px;
                                font-size: 10px;
                                border-radius: 50%;
                                display: block;
                                text-align: center;
                                
                            }
                            .circle_red{
                                background-color: #f76767;
                                color: #fff;
                            }
                            .circle_gray {
                                background-color: #e5e5e5;
                                color: #666;
                            }
                    }
                }
            }
        }

        // 中间模块
        .mianContent_box {
            float: left;
            width: calc(100% - 320px);
            //  公告栏
            .con_notice {
                padding: 10px 20px;
                color: #666;

                .el-icon-info {
                    color: #f76767;
                }
            }

            // 新单核保/保全核保/理赔二核/续期核保/承保后调查 3个大模块
            .con_column {
                padding: 0 20px;
                overflow: hidden;

                .column_title {
                    padding: 15px;
                    color: #fff;
                }

                .text_name {
                    padding: 3px 0;
                    color: #fff;
                }

                .el_icon {
                    font-size: 24px;
                }

                // 新单核保
                .newUnderwrites {
                    float: left;
                    background-image: linear-gradient(to bottom right, #f18c93, #a592e1);
                    border-radius: 5px;
                    // width: 450px;
                    width: 48%;
                    height: auto;

                    .newUnderwrites_echarts {
                        width: 92px;
                        height: 92px;
                        margin: 0 auto;
                        padding: 40px;

                        .echarts_num {
                            width: 92px;
                            height: 92px;
                            line-height: 92px;
                            text-align: center;
                            display: block;
                            margin: 0 auto;
                            font-size: 28px;
                            color: #333;
                        }
                    }

                    .newUnderwrites_num {
                        border-top: 1px solid #fff;
                        padding: 10px 0;
                        margin-top: 30px;

                        .bor {
                            border-left: 1px solid #fff;
                            border-right: 1px solid #fff;
                        }

                        .num {
                            font-size: 18px;
                        }
                    }
                }

                // 保全核保/理赔二核/续期核保/承保后调查
                .big_column_box {
                    float: left;
                    border-radius: 5px;
                    background-color: #9690cb;
                    // width: 437px;
                    width: 50%;
                    // height: 168px; //2020-04-17
                    margin: 0 0 0 2%;
                    .bor_right {
                        border-right: 1px dotted #ffffff!important;
                        // min-height: 165px;
                        padding-bottom: 10px;
                    }

                    .big_num {
                        font-size: 36px;
                        padding: 0px 20px;
                    }

                    .small_num {
                        padding: 0 15px;
                        font-size: 18px;
                    }

                    .big_text_name {
                        color: #fff;
                    }

                    .text_name {
                        // padding-right: 10%;
                        overflow: hidden;
                    }
                }

                // 续期核保
                .xuqi {
                    background-color: #c391cc;
                    margin: 2% 0 0 2%;
                }
            }

            // 特别事项/资料修正/再保处理/预核保 4个小模块
            .small_column_box:hover {
                box-shadow: 5px #f76767;
                border: 1px solid #f76767;
                cursor: pointer;
            }

            .small_column_box {
                box-shadow: 5px 5px 10px 5px #f5f5f5;
                border: 1px solid #e1e1e1;
                border-radius: 4px;
                background-color: #fff;

                .small_column_title {
                    padding: 10px;
                    border-bottom: 1px solid #e5e5e5;
                    background-color: #f5f5f5;
                    color: #666;

                    span.name {
                        color: #333333;
                    }
                }

                .small_column_num {
                    padding: 20px 0;

                    .big_num {
                        font-size: 36px;
                        padding: 0px 20px;
                        color: #68a3fc;
                    }

                    .small_num {
                        padding: 0 15px;
                        font-size: 18px;
                    }

                    .text_name {
                        // padding-right: 10%;
                        overflow: hidden;
                        color: #666;
                    }
                }

            }

            // 实时作业监控

            .column_task_title {
                padding: 20px 0 10px 0;
                color: #666;

                span {
                    color: #333;
                }
            }

            .task_box {
                box-shadow: 5px 5px 10px 5px #f5f5f5;
                border: 1px solid #e1e1e1;
                border-radius: 4px;
                margin-bottom: 20px;

                .task_bor_right {
                    border-right: 1px dotted #dddddd;
                }

                .col_task_title {
                    padding: 15px 20px;
                    background-color: #fcfcfc;
                    border-bottom: 1px solid #e1e1e1;
                }

                .col_task_con {
                    padding: 15px 0 15px 20px;
                    background-color: #fff;

                    .task_con {
                        .task_con_list {
                            padding: 10px 0px 0 0;
                            overflow: hidden;
                             span{
                                font-size: 12px;
                            }
                            .task_num {
                                color: #666;

                                .total {
                                    background-color: #fec0be;
                                    // text-align: center;//2020-03-17
                                }

                                .unfinished {
                                    background-color: #f76767;
                                    // width: 60%;
                                    // display: inline-block;
                                    display: block;
                                    // text-align: center;//2020-03-17
                                    margin-right: 10px;
                                    height: 16px;
                                }
                                .fsize10{
                                    font-size: 10px;
                                }
                            }
                        }
                    }
                }
            }
        }

    }
</style>



